package cn.jichangxiu.auth.client;

import cn.jichangxiu.common.web.model.response.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "prey-ucenter" , fallback = UCenterClientBack.class)
public interface UCenterClient {
    @GetMapping("/api/getAuthByRoleId/{roleId}")
    public R getAuthByRoleId(@PathVariable("roleId") String roleId);

    @GetMapping("/api/getRolesByUserId/{userId}")
    public R getRolesByUserId(@PathVariable("userId")  String userId);

    @GetMapping("/api/getUserByUserId/{userId}")
    public R getUserByUserId(@PathVariable("userId") String userId);

    @GetMapping("/api/getUserByAccount/{account}")
    public R getUserByAccount(@PathVariable("account") String account);

    @GetMapping("/api/getUserAuths/{userId}")
    public R getUserAuths(@PathVariable("userId") String userId);

}
